import request from '@/config/axios'


//获取所有文章
export const dataList = (params) => {
  return request.get({ url: '/article/list',params })
}


export const dataInfo = (params) => {
  return request.get({ url: '/article/info',params })
}

//新增文章
export const dataInsert = (data) => {
  return request.post({ url: '/article/add', data })
}


//修改文章
export const dataUpdate = (data) => {
  return request.post({ url: '/article/update', data })
}

//删除文章
export const dataDel = (params) => {
  return request.get({ url: '/article/delete', params })
}


//审核文章
export const dataCheck = (data) => {
  return request.post({ url: '/article/do-check', data })
}

//上传文件

export const fileUpload = (data) => {
  return request.post({ url: '/index/upload', data })
}